```
xhr =new XMLHttpRequest()
xhr.onreadystatechange =()=>{
    if(xhr.readystate == 4){
        if(xhr.status>=200&&xhr.status<300||xhr.status==304){
            console.log(xhr.responseText)
        }
        else{
            alert("请求出错"+xhr.status)
        }
    }
}
xhr.open("get","...","false")
xhr.send(null)
```;
